Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Finder Guide /
Chapter 2 - Finder Objects / Object Class Definitions


Trash-Object

An object of class Trash-Object is the Trash for a specific Finder application. The Trash property of the Finder application is an object of this class.

PROPERTIES
A trash-object has all the properties defined for object class Container on page 42: Completely Expanded, Container Window, Entire Contents, Expandable, Expanded, Previous List View, Selection, and View.

Like any other container, a trash-object also has all the properties defined for object class object class Item on page 72: Bounds, Comment, Container, Content Space, Creation Date, Disk, Folder, Icon, ID, Information Window, Kind, Label Index, Modification Date, Name, Physical Size, Position, Selected, Size,
and Window.

Unlike other containers, a trash-object also has these properties:

warn before emptying
A Boolean value that indicates whether the Warn Before Emptying checkbox in the Trash's Information Window is selected (true) or not (false).
Class: Boolean
Modifiable: Yes
ELEMENT CLASSES
Objects of these classes can be identified at the top level of a trash-object by name or by number. Page numbers indicate the location of corresponding definitions in this chapter.

Accessory Suitcase (page 27)
Alias File (page 28)
Application File (page 38)
Container (page 42)
Control Panel (page 51)
Desk Accessory File (page 54)
Document File (page 59)
File (page 60)
Folder (page 62)
Font File (page 64)
Font Suitcase (page 65)
Item (page 72)
Sharable Container (page 78)
Sound File (page 86)
Suitcase (page 88)
COMMANDS HANDLED
Count, Exists, Sort, Update

DEFAULT VALUE CLASS RETURNED
Reference.

EXAMPLE
To refer to a trash-object, you must use the Trash property of the desktop:

tell application "Finder"   clean up trash
end tell
Note that it's not necessary to refer to the trash of desktop; the Finder interprets trash as the desktop's Trash property.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996